﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SMBL.Interface.AbstractServer
{
    /// <summary>
    /// The interface of an provider.
    /// </summary>
    public interface IAProvider : LifeCycle.IStart, LifeCycle.IEnd, IAProcessor
    {
        /// <summary>
        /// Lock the resource. The function should lock the process.
        /// </summary>
        /// <returns>The lock statue</returns>
        Boolean Lock();

        /// <summary>
        /// Lock the resource. The function should lock the process in the limit time.
        /// </summary>
        /// <param name="TimeOut">The limit time.</param>
        /// <returns>The lock statue</returns>
        Boolean Lock(Int32 TimeOut);

        /// <summary>
        /// Unlock the resource.
        /// </summary>
        void UnLock();
    }
}
